﻿@namespace BootstrapBlazor.Components
@inherits ComponentBase
@inject IJSWindow JSWindow
@inject MessageService MessageService

<FileUpload OnUpload="OnUploadFile">
    <RenderComponent Context="renderFileUpload">
        @{
            var renderInfo = GetRenderInfo(renderFileUpload);
        }
        @if (RenderComponent is null)
        {
            <div class="commonContainers">
                @renderInfo.RenderUpload
                @renderInfo.RenderPreview
            </div>
        }
        else
        {
            @RenderComponent(renderInfo)
        }
    </RenderComponent>
</FileUpload>